Skip to main content

Zoom

All commands related to the zoom feature.

zoomIn ⇒ number

Zoom in to the PDF.

Example

TFTPDFGadget.callCommand({ name: 'zoomIn', callback: myfunc });

zoomOut ⇒ number

Zoom out to the PDF.

Example

TFTPDFGadget.callCommand({ name: 'zoomOut', callback: myfunc });

zoomReset ⇒ number

Reset the zoom to fit the page.

Example

TFTPDFGadget.callCommand({ name: 'zoomReset', callback: myfunc });

setZoom

Select the zoom size/mode.

ParamTypeDescription
scalestringauto - page-actual - page-fit - page-width - 50 - 75 - 100 - 125 - 150 - 200 - 300 - 400

Available scale options:

  • auto: Scale the page to fit the screen.
  • page-actual: Scale the page to 100%.
  • page-fit: Scale the page to fit the screen.
  • page-width: Scale the page to fit the screen width.

Example

TFTPDFGadget.callCommand({
name: 'setZoom',
args: { scale: 'auto' },
callback: myfunc,
});